import { http } from "../../utils/index";

// 添加
export function addArtcle(params) {
  return http.post("/article", params);
}

// 编辑
export function editArtcile(params) {
  return http.put("/article/edit", params);
}

// 获取列表
export function getArticle() {
  return http.get("/article/list");
}

// 获取详情
export function getArticleDetail(id) {
  return http.get(`/article/detail/${id}`);
}

// 删除
export function deleteArticle(id) {
  return http.delete(`/article/delete/${id}`);
}

export function getUser() {
  return http.get("/user");
}
